package com.tiro.springboot.sample.mapper;


import com.tiro.springboot.sample.po.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {

    //@Select("SELECT * FROM USER WHERE NAME = #{name}")
    User findByName(@Param("name") String name);

    @Insert("INSERT INTO USER(NAME, AGE, STATUS) VALUES(#{name}, #{age}, #{status})")
    int insert(@Param("name") String name, @Param("age") Integer age,@Param("status")Integer status);
}